{% extends 'templates/base_hader.html' %}
{% block content %}

    <div class="container-fluid">
        <div class="row">
            <div class="col-sm-1">
                <div class="panel panel-primary">
                    <div class="panel-heading">
                        <h3 class="panel-title"><a href="/plan/plan_list/?query=制造一课">制造一课</a></h3>
                    </div>
                    <div class="panel-body small">
                        <ul class="nav nav-sidebar">
                            <li><a href="/plan/plan_list/?query=SMT_1L">1L计划</a></li>
                            <li><a href="/plan/plan_list/?query=SMT_2L">2L计划</a></li>
                            <li><a href="/plan/plan_list/?query=SMT_3L">3L计划</a></li>
                            <li><a href="/plan/plan_list/?query=SMT_4L">4L计划</a></li>
                            <li><a href="/plan/plan_list/?query=SMT_5L">5L计划</a></li>
                            <li><a href="/plan/plan_list/?query=SMT_6L">6L计划</a></li>
                            <li><a href="/plan/plan_list/?query=SMT_7L">7L计划</a></li>
                            <li><a href="/plan/plan_list/?query=SMT_8L">8L计划</a></li>
                            <li><a href="/plan/plan_list/?query=SMT_9L">9L计划</a></li>
                            <li><a href="/plan/plan_list/?query=AI_1L">RH-1L</a></li>
                            <li><a href="/plan/plan_list/?query=AI_2L">RH-2L</a></li>
                            <li><a href="/plan/plan_list/?query=AI_3L">RH-3L</a></li>

                        </ul>

                    </div>
                </div>
                <div class="panel panel-primary">
                    <div class="panel-heading">
                        <h3 class="panel-title"><a href="/plan/plan_list/?query=制造二课">制造二课</a></h3>
                    </div>
                    <div class="panel-body small">
                        <ul class="nav nav-sidebar">
                            <li><a href="/plan/plan_list/?query=DIP_C">C线计划</a></li>
                            <li><a href="/plan/plan_list/?query=DIP_F">F线计划</a></li>
                            <li><a href="/plan/plan_list/?query=DIP_M">M线计划</a></li>
                            <li><a href="/plan/plan_list/?query=DIP_TS">测试线</a></li>
                            <li><a href="/plan/plan_list/?query=DIP_TJ">涂胶线</a></li>
                            <li><a href="/plan/plan_list/?query=DIP_ZJ">注胶线</a></li>
                            <li><a href="/plan/plan_list/?query=DIP_JJ">浸胶线</a></li>

                        </ul>
                    </div>
                </div>
                <ul class="nav nav-sidebar">
                    <li class="active"><a href="/plan/order_list/">工单列表 <span class="sr-only">(current)</span></a>
                    </li>
                    <li class="active"><a href="/plan/daily_list/">日报列表 <span class="sr-only">(current)</span></a>
                    </li>
                    {#                    <li class="active"><a href="/plan/plan_list/?query=制造一课">制造一课计划列表 <span#}
                    {#                            class="sr-only">(current)</span></a></li>#}
                    {#                    <li class="active"><a href="/plan/plan_list/?query=制造二课">制造二课计划列表 <span class="sr-only">(current)</span></a>#}
                    {#                    </li>#}
                    <li class="active"><a href="#"></a></li>
                </ul>
                {#                <ul class="nav nav-sidebar">#}
                {#                    <li class="active"><a href="/plan/order_list/">日报列表 <span class="sr-only">(current)</span></a>#}
                {#                    </li>#}
                {#                    <li class="active"><a href="/plan/plan_list/">制造二课日报列表 <span#}
                {#                            class="sr-only">(current)</span></a></li>#}
                {#                    <li><a href="#"></a></li>#}
                {#                    <li><a href="#"></a></li>#}
                {#                </ul>#}

            </div>
            <div class="col-md-11 " style="height: auto">
                <div class="clearfix"><h2 class="sub-header">批量编辑计划</h2></div>


                {#                <form action="" method="get">#}
                {#                    <div class="col-md-3">#}
                {#                        <div class="">#}
                {#                            <input type="text" value="" name="query">#}
                {#                            <input type="submit" class="btn btn-primary" value="搜索">#}
                {#                        </div>#}
                {##}
                {#                    </div>#}
                {#                </form>#}

                <form action="" method="post">
                    {% csrf_token %}
                    {{ formset_obj.management_form }}
                    <div class="table-responsive ">

                        <br>

                        {% for plan_form_obj in formset_obj %}
                            <h3>编辑计划序号：{{ forloop.counter }}</h3>
                            <table>
                                {{ plan_form_obj.id }}
                                {{ plan_form_obj.as_table }}
                                {#                                                        {{ plan_form_obj.value }}#}
                            </table>

                            <hr>
                        {% endfor %}
                        {#                        <table class="table table-hover table-striped" data-height="500">#}
                        {#                            <thead>#}
                        {#                            <tr>#}
                        {#                                <th>#</th>#}
                        {#                                <th>工程编号</th>#}
                        {#                                <th>客户</th>#}
                        {#                                <th>机种名</th>#}
                        {#                                <th>工单数量</th>#}
                        {#                                <th>生产数量</th>#}
                        {#                                <th>生产工程</th>#}
                        {#                                <th>线别</th>#}
                        {#                                <th>班次</th>#}
                        {#                                <th>生产日期</th>#}
                        {##}
                        {#                                <th>出货日期</th>#}
                        {#                                <th>备注</th>#}
                        {#                                <th>负荷</th>#}
                        {#                                <th>切换</th>#}
                        {#                                <th>顺序</th>#}
                        {#                                <th>制造部门</th>#}
                        {#                                <th>检查时间</th>#}
                        {#                                <th>编辑</th>#}
                        {#                            </tr>#}
                        {#                            </thead>#}
                        {#                            <tbody>#}
                        {#                            {% for plan_form_obj in formset_obj %}#}
                        {#                                <tr style="font-size:smaller">#}
                        {##}
                        {#                                    <td>{{ forloop.counter }}</td>#}
                        {#                                        {{ plan_form_obj.id }}#}
                        {#                                    <td>{{ plan.plan_pro_code }}</td>#}
                        {#                                    <td>{{ plan_form_obj.instance.order.code }}</td>#}
                        {#                                    <td>{{ plan_form_obj.instance.sku.name }}</td>#}
                        {#                                    <td>{{ plan_form_obj.instance.Lot }}</td>#}
                        {#                                    <td>{{ plan_form_obj.instance.work_int }}</td>#}
                        {#                                    <td>{{ plan_form_obj.instance.work_process }}</td>#}
                        {#                                    <td>{{ plan_form_obj.instance.get_line_display }}</td>#}
                        {#                                    <td>{{ plan_form_obj.instance.get_work_num_display }}</td>#}
                        {#                                    <td style="width: 120px">{{ plan_form_obj.date_num}}</td>#}
                        {##}
                        {#                                    <td style="width: 120px">{{ plan_form_obj.spd }}</td>#}
                        {#                                    <td style="width: 150px">{{ plan_form_obj.memo|default:"" }}</td>#}
                        {#                                    <td style="width: 90px">{{ plan_form_obj.working_hours }}</td>#}
                        {#                                    <td>{{ plan_form_obj.instance.change_time }}</td>#}
                        {#                                    <td  style="width: 90px">{{ plan_form_obj.production_line_num }}</td>#}
                        {#                                    <td>{{ plan_form_obj.production_department }}</td>#}
                        {#                                    <td  style="width: 90px">{{ plan_form_obj.check_time }}</td>#}
                        {#                                    <td>编辑</td>#}
                        {##}
                        {#                                </tr>#}
                        {#                            {% endfor %}#}
                        {##}
                        {##}
                        {#                            </tbody>#}
                        {#                        </table>#}
                        <div class="pull-right">{{ page_obj.page_html |safe }}</div>
                    </div>
                    <button type="submit" class="btn btn-success"><small>提交</small></button>
                </form>


            </div>
        </div>
    </div>
{% endblock %}

{% block js %}
    <script>


    </script>
{% endblock %}

